package com.mysoft.gfyx.marketdevelop.controller;

import com.mysoft.framework.rpc.annotation.PubAction;
import com.mysoft.framework.rpc.annotation.PubService;
import com.mysoft.framework.rpc.contants.RequestPrefix;
import com.mysoft.gfyx.marketdevelop.remoteService.dto.DeleteByIdRequestDto;
import com.mysoft.gfyx.marketdevelop.remoteService.dto.ImportCustomerPoolRequestDto;
import com.mysoft.gfyx.marketdevelop.remoteService.dto.ImportCustomerPoolResponseDto;
import com.mysoft.gfyx.marketdevelop.service.DeveloperContactService;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMethod;
import com.mysoft.gfyx.marketdevelop.remoteService.RemoteCustomerService;

@PubService(value = "/customerPoolDataApi", prefix = RequestPrefix.API)
@Tag(name = "客户池-API")
public class CustomerPoolDataApiController {

    @Autowired
    private RemoteCustomerService remoteCustomerService;

    @Autowired
    private DeveloperContactService developerContactService;

    @PubAction(value = "/deleteCustomerPool", method = RequestMethod.POST)
    public void deleteCustomerPool(@RequestBody DeleteByIdRequestDto dto) {
        remoteCustomerService.deleteCustomerPool(dto);
    }

    @PubAction(value = "/importCustomerPool", method = RequestMethod.POST)
    public ImportCustomerPoolResponseDto importCustomerPool(@RequestBody ImportCustomerPoolRequestDto dto) {
        return remoteCustomerService.importCustomerPool(dto);
    }
}
